const apiURL = 'http://47.94.23.135:8080';

const wxRequest = (params, url) => {
	wx.request({
		url,
		method: params.method || 'GET',
		data: params.data || {},
		header: {
			Accept: 'application/json',
			'Content-Type': 'application/json',
		},
		success(res) {
			if(params.success) {
				params.success(res);
			}
		},
		fail(res) {
			if(params.fail) {
				params.fail(res);
			}
		},
		complete(res) {
			if(params.complete) {
				params.complete(res);
			}
		},
	});
};


const sendSms = (params) => {
  wxRequest({ success: params.success ,data:params.data}, apiURL+'/sys/veriCode/sendSms');
};



module.exports = {
  
  sendSms

};